home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / SYS / s / LoadDesktop.bed < prev    next >
Text File  |  1996-09-26  |  1KB  |  74 lines

  1. /*
  2. ** $VER: SaveDesktop.bed 1.0 (02.01.96)
  3. **
  4. ** Load the layout of the desktop fromn a file
  5. */
  6.  
  7. OPTIONS RESULTS
  8. OPTIONS FAILAT 11
  9. PARSE ARG name
  10.  
  11. IF name = "" THEN DO
  12.     RequestFile 'TITLE "Select File to Load as Layout"' 'PATTERN "#?.layout"' 'BED:Support/'
  13.     IF RC ~= 0 THEN EXIT
  14.     name = RESULT
  15. END
  16.  
  17. ADDRESS BED
  18.  
  19. IF Open(file,name,READ) THEN DO
  20.  
  21.     DO FOREVER
  22.         name = ReadLn(file)
  23.  
  24.         IF name = "" THEN EXIT
  25.  
  26.         window = ReadLn(file)
  27.         coord = ReadLn(file)
  28.         a = ReadLn(file)
  29.  
  30.         OpenDoc 'WINDOW=' || window || " " || name
  31.         ADDRESS VALUE RESULT
  32.         Move coord
  33.     END
  34. END
  35.  
  36. /*
  37. IF Open(save,name,WRITE) THEN DO
  38.     DO WHILE docs ~= ""
  39.         PARSE VAR docs '"'.'"' port docs
  40.  
  41.         ADDRESS VALUE port
  42.  
  43.         GetFilePath
  44.         WriteLn(save,RESULT)
  45.  
  46.         GetWindowInfo
  47.         PARSE VAR RESULT icon x1 y1 w1 h1 .
  48.  
  49.         IconifyWindow TOGGLE
  50.  
  51.         GetWindowInfo
  52.         PARSE VAR RESULT . x2 y2 w2 h2 .
  53.  
  54.         IconifyWindow TOGGLE
  55.  
  56.         IF icon = ON THEN DO
  57.             str = x2 || '/' || y2 || '/' || w2 || '/' || h2 || '/' || x1 || '/' || y1 || '/ICONIFY'
  58.         END; ELSE DO
  59.             str = x1 || '/' || y1 || '/' || w1 || '/' || h1 || '/' || x2 || '/' || y2
  60.         END
  61.         WriteLn(save,str)
  62.  
  63.         GetCursorPos
  64.         str = WORD(RESULT,1) WORD(RESULT,2)
  65.         WriteLn(save,str)
  66.  
  67.         WriteLn(save,"")
  68.  
  69.         i = i+1
  70.     END
  71.  
  72.     Close(save)
  73. END
  74. */